package com.eclipse.org.snms.serializer.updateStickyNote;
import com.eclipse.org.snms.*;
import com.eclipse.org.snms.reminder.ReminderObserver;
import com.eclipse.org.snms.reminder.ReminderSubjectConcrete;
import com.eclipse.org.snms.serializer.stickyNoteList.*;
import com.eclipse.org.snms.summary.SummaryObserver;
/**
 * 
 * @author 
 *
 */
public class ConcreteObserver implements SummaryObserver, ReminderObserver
{
	StickyNoteList stickyNotList = StickyNoteList.getUniqueInstance();

	public void update(StickyNote sn, int transType)
	{
		if (transType==0)
		{
			stickyNotList.addStickyNote(sn);
		}
		else if (transType==1)
		{
			stickyNotList.updateStickyNote(sn);
		}
		else if (transType==2)
		{
			stickyNotList.deleteStickyNote(sn);
		}
	}
	@Override
	public void update(StickyNote stickyNote) {
		stickyNotList.updateStickyNote(stickyNote);
	}

}
